﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DB_NH.DB_Map.KaoQin
{
    using NHibernate;
    using NHibernate.Mapping.ByCode;
    using NHibernate.Mapping.ByCode.Conformist;

    using DB_NH.DB_Model.KaoQin;

    public class map_kqData : EntityMapping<kqData>
    {
        public map_kqData()
        {
            Property(x => x.CheckData, map =>
            {
                map.Length(40);
            });

            Property(x => x.CheckDate, map =>
            {

            });

            Property(x => x.CheckFlag, map =>
            {
                map.Length(40);
            });

            Property(x => x.CheckMonth, map =>
            {
                map.Length(10);
            });

            Property(x => x.CheckRemark, map =>
            {
                map.Length(200);
            });

            Property(x => x.CheckTitle, map =>
            {
                map.Length(100);
            });

            Property(x => x.CheckYear, map =>
            {
                map.Length(10);
            });

            Property(x => x.CheckData, map =>
            {
                map.Length(40);
            });

            //员工
            ManyToOne(x => x.User, map =>
            {
                map.Column("UserId");
                map.NotNullable(false);
            });
        }
    }
}
